package mastetAndWorker;

import java.util.Map;
import java.util.concurrent.ExecutionException;

public class Main {


    public static void main(String[] args) throws ExecutionException, InterruptedException {

        Master master = new Master(new PlusWorker(), 5);
        for (int i = 0; i < 100; i++) {
            master.submit(i);
        }

        master.execute();
        Thread.sleep(3000);
        Map res = master.getResultMap();
        System.out.println(res);
    }
}
